import request from '@/utils/request'
// 查询门诊列表
export function listClinic(query, headers = {}) {
  return request({
    url: '/erp/clinic/list',
    method: 'get',
    params: query,
    headers,
  })
}

// 查询门诊详细
export function getClinic(id) {
  return request({
    url: '/erp/clinic/' + id,
    method: 'get',
  })
}

// 新增门诊
export function addClinic(data) {
  return request({
    url: '/erp/clinic',
    method: 'post',
    data: data,
  })
}

// 修改门诊
export function updateClinic(data) {
  return request({
    url: '/erp/clinic',
    method: 'put',
    data: data,
  })
}

// 删除门诊
export function delClinic(id) {
  return request({
    url: '/erp/clinic/' + id,
    method: 'delete',
  })
}

// 导出门诊
export function exportClinic(query) {
  return request({
    url: '/erp/clinic/export',
    method: 'get',
    params: query,
  })
}
